package com.nxk.modules.core.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

@Accessors
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_param")
public class SysParam extends BaseEntity implements Serializable {

     private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.UUID)
    public String id;

    @NotEmpty(message = "参数名称不能为空")
    @Length(max = 64,message = "参数名称不能大于64位")
    @TableField(condition = SqlCondition.LIKE)
    private String paramName;

    @NotEmpty(message = "参数键不能为空")
    @Length(max = 64,message = "参数键长度不能大于64位")
    @TableField(condition = SqlCondition.LIKE)
    private String paramKey;

    @NotEmpty(message = "参数值不能为空")
    @Length(max = 64,message = "参数值长度不能大于64位")
    @TableField(condition = SqlCondition.LIKE)
    private String paramValue;

    @NotEmpty(message = "是否为系统参数不能为空")
    @Length(max = 1,message = "是否为系统长度不能大于1位")
    private String isSystem;

    @Length(max = 500,message = "参数描述不能大于500位")
    private String paramDetail;






}
